home *** CD-ROM | disk | FTP | other *** search
- <%@ page language="java" import="
- java.util.*,
- com.jproxy.site.ejbeans.interfaces.*,
- com.jproxy.site.*"
- %>
- <jsp:useBean id="ses" scope="session" class="com.jproxy.site.JSPSession"/>
- <%
- if (!ses.isLoggedIn()) {
- %>
- <jsp:forward page="login.jsp">
- </jsp:forward>
- <%
- }
- ses.request(pageContext);
- ses.setNewHit(pageContext, "hits", "Customers List", null);
- %>
-
- <%
- ICustomer account = ses.getLogin();
- String customerName = account.getCustomerName();
- String customerID = account.getID();
- int totalLicenses = 0;
- int totalPurchasedLicenses = 0;
- String bgcolors[] = {"#F3F8FF", "#FFFFFF"};
-
- Vector customers = ses.session.getCustomers(customerID);
- %>
-
- <!-- HEADER -->
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="pageId" value="customer_list"/>
- </jsp:include>
-
- <!-- MAIN PANEL -->
- <br>
- <table class="h8Verdana" cellpadding="5" width="100%" border="0">
- <!-- Prolog -->
- <tr>
- <td>
- <span class="h9VerdanaBold"><%=customerName%></span>, welcome to OEM Partner Managing Console!
- <p>
- <%
- if (customers.size() == 0)
- {
- %>
- In order to start purchasing licenses you need to create a customer
- entry for which you would like to purchase those licenses for.
- <p>
- To create a new Customer please click
- <a class="h8VerdanaBold" href="<%=JSPRes.path%>/main/customers/customer-edit.jsp?key=new" alt="Creates a new customer">here</a>
- or use a navigation bar in the left side of the window.
- <p>
- <%
- }
- else
- {
- %>
- <table class="h8Verdana" border="0" cellpadding="2" cellspacing="2" width="100%">
- <tr class="h8VerdanaBold" bgcolor="9c9cff">
- <!--
- <td>
- <INPUT name="delete_customer" type="submit" value="Delete">
- </td>
- -->
- <td width="30%">Customer Name</td>
- <td width="50%">Customer Details</td>
- <td width="10%">Purchased<br>licenses</td>
- <td width="10%">Action</td>
- </tr>
-
- <%
- for(int i=0; i<customers.size(); i++)
- {
- ICustomer customer = (ICustomer)customers.elementAt(i);
- String _customerID = customer.getID();
- Vector purchases = ses.session.findPurchases(_customerID, "");
- int purchasedLicenses = 0;
- for(int j=0; j<purchases.size(); j++)
- {
- IPurchase purchase = (IPurchase)purchases.elementAt(j);
- int licenses = purchase.getNumberOfLicenses();
- purchasedLicenses += licenses;
- totalPurchasedLicenses += licenses;
- }
- %>
-
- <!-- Customer 1 Begin -->
- <tr bgcolor="<%=bgcolors[i % 2]%>">
- <!--
- <td align="center">
- <INPUT name="selected" type="checkbox">
- </td>
- -->
- <td align="left">
- <%
- if(purchasedLicenses==0)
- {
- %>
- <a href="<%=JSPRes.path%>/main/customers/customer-edit.jsp?key=edit&customer-id=<%=_customerID%>&forward=customer-list.jsp"><%=customer.getCustomerName()%></a>
- <%
- }
- else
- {
- %>
- <%=customer.getCustomerName()%>
- <%
- }
- %>
- </td>
- <td align="left">
- <%
- if (customer.getDetails().length() == 0)
- %>
- None
- <%
- else
- %>
- <%=customer.getDetails()%>
- </td>
- <td align="left">
- <%=purchasedLicenses%>
- </td>
- <td align="left" valign="center">
- <a class="h8Verdana" href="<%=JSPRes.path%>/main/customers/product-list.jsp?customer-id=<%=_customerID%>"> [Products] </a>
- </td>
- </tr>
- <%
- }
- %>
- <!-- Customer N End -->
- </table>
- <p>
-
- <table class="h8Verdana" width="100%" border="0" bgcolor="#f3f8ff" cellpadding="1" cellspacing="0">
- <tr>
- <td>
- <span class="h8Verdana">
- You've a total of <span class="h8VerdanaBold"><%=customers.size()%></span>
- customers with total purchase of <span class="h8VerdanaBold"><%=totalPurchasedLicenses%></span>
- licenses
- </span>
- </td>
- </tr>
- </table>
-
- <p>
- For technical support please follow <i>[Products]</i> link.
- Note, that your support contract must still be valid.
- <p>
- <!--
- If you think that you've found a bug please submit your findings to
- <a class="h8VerdanaBold" href="mailto:<%=JSPRes.techSupport%>?subject=Bug Report&body=My Partner ID:
- {Your ePortal Login name}%0d%0a
- Product name and version: JProxy Tunnel {your version}%0d%0a
- JVM provider and version:%0d%0a
- Browser name and version:%0d%0a
- AppServer name and version:%0d%0a
- Apache/Tomcat/{ServlerEngine} version:%0d%0a
- Problem description:%0d%0a
- Stack trace:%0d%0a">this email</a>.
- -->
- <%
- }
- %>
- </td>
- </tr>
- <table>
-
- <!-- <br><a href="<%=JSPRes.path%>/main/customers/acedit.jsp?key=edit&forward=customer-list.jsp">Edit My Profile</a> -->
- <!-- FOOTER -->
- <jsp:include page="footer.jsp" flush="true"/>
-